package creditcard.account;

import java.util.HashMap;
import java.util.Map;

/**
 * Created with IntelliJ IDEA.
 * User: asus
 * Date: 12/18/12
 * Time: 5:19 PM
 * To change this template use File | Settings | File Templates.
 */
public abstract class CreditCardType {
    private static final Map<String, CreditCardType> type = new HashMap<String, CreditCardType>();

    static {
        type.put("gold", new Gold());
        type.put("silver", new Silver());
        type.put("bronze", new Bronze());

    }

    public static CreditCardType getType(String key) {
        return type.get(key);
    }

    public abstract float getMinPRate();

    public abstract float getMonthylRate();
}
